import router from '@system.router';
import dataStorage from '@ohos.data.storage'
import featureAbility from '@ohos.ability.featureAbility'
export default {
    data: {
        index:0,
        label_2:{
            prevLabel: '上一步',
            status: 'normal'
        },
        label_3:{
            prevLabel: '上一步',
            nextLabel: '进入淘宝',
            status: 'normal'
        },
        imagesrc1:"/common/yindao/yindao1.jpg",
        imagesrc2:"/common/yindao/yindao2.jpg",
        imagesrc3:"/common/yindao/yindao3.jpg",
    },
    stepperNext(e){
        console.log("stepperNext"+e.index)
        var index = {pendingIndex:e.pendingIndex }
        return index;
    },
    stepperBack(e){
        console.log("stepperBack"+e.index)
        var index = {pendingIndex: e.pendingIndex }
        return index;
    },
    enterdenglu(){
        console.log("进去登录了");
        let flag  = 1;
        var context = featureAbility.getContext();
        context.getFilesDir((err, path) => {
            if (err) {
                console.error('getFilesDir failed. err: ' + JSON.stringify(err));
                return;
            }
            console.info('path:' + path) // /data/data/com.iss.myapplication/files
            let store = dataStorage.getStorageSync(path + '/mystore');
            store.putSync('flag', flag);
            store.flushSync();
            router.push({
                uri:"pages/qidong/qidong",
            });
        });
    },
    onInit(){
        console.log("初始化");
    }
}
    